package com.heima.test01;

public class Rectangle {
    private int longth;
    private int hight;

    public Rectangle() {
    }

    public Rectangle(int longth, int hight) {
        this.longth = longth;
        this.hight = hight;
    }

    public int getLongth() {
        return longth;
    }

    public void setLongth(int longth) {
        this.longth = longth;
    }

    public int getHight() {
        return hight;
    }

    public void setHight(int hight) {
        this.hight = hight;
    }

    public void area() {
        System.out.println("面积为:" + getLongth() * getHight());

    }

    public void circumference() {
        System.out.println("周长为:" + (getLongth() + getHight()) * 2);
    }

}
